<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<script>
    function get(url,callback) {
        var oreq=new XMLHttpRequest()

        oreq.onload=function () {
            // console.log(oreq.response)
            callback(oreq.response)
        }
        oreq.open('get',url,true)
        oreq.send()
    }

    get('./package.json',function (data) {
        console.log(data)
    })
</script>
</body>
</html>
